from vec import Vec2
import math
WIDTH = 500
HEIGHT = 500

pc = (0, 200, 0)
bc = (0, 0, 0)

len = 100
pt_mid = Vec2(WIDTH / 2, HEIGHT / 2)
y_offset = len / math.sqrt(3) 
pt_a = Vec2(pt_mid.x, pt_mid.y - y_offset)
pt_d = Vec2(pt_mid.x, pt_mid.y + 50 / math.sqrt(3))
pt_b = Vec2(pt_d.x - 50, pt_d.y)
pt_c = Vec2(pt_d.x + 50, pt_d.y)

def draw():
    screen.fill(bc)
    
    screen.draw.line(pt_a.raw_get(), pt_b.raw_get(), pc)
    screen.draw.line(pt_b.raw_get(), pt_c.raw_get(), pc)
    screen.draw.line(pt_c.raw_get(), pt_a.raw_get(), pc)